﻿@{
    Layout = null;
}
<link href="/Scripts/uploadify/uploadify.css" rel="stylesheet" type="text/css" />
<script src="/Scripts/uploadify/swfobject.js" type="text/javascript"></script>
<script src="/Scripts/uploadify/jquery.uploadify.v2.1.4.min.js" type="text/javascript"></script>
<script type="text/javascript">
    //绑定上传的方法
    $(function () {
        $('#FileLoad_Organize_ShowPic').uploadify({
            'uploader': '/Scripts/uploadify/uploadify.swf?id=' + (new Date()).getTime(),
            'script': '/Permission/Organize/UpdatingPic/',
            'method': 'POST',
            'scriptData': { 'id': '@ViewBag.ID' },
            'cancelImg': '/Scripts/uploadify/cancel.png',
            'folder': '/File/',
            'queueID': 'FileQueue_Organize_ShowPic',
            'wmode': 'transparent',
            'fileDesc': '文件类型',
            'fileExt': '*.jpg;*.gif;*.png;*.bmp',
            'sizeLimit': '112048',
            'height': '30px',
            'removeCompleted': true,
            'buttonText': "选择文件",
            'multi': false,
            'onComplete': function (event, queueID, fileObj, response, data) {
                var json_Organize_ShowPic = eval("(" + response + ")");
                var ajaxbg = $("#background,#progressBar,#lui_List_Common_Organize_ShowPic");
                ajaxbg.hide();
                if (json_Organize_ShowPic.statusCode == "300") {
                    alertMsg.error(json_Organize_ShowPic.message);
                } else {
                    alertMsg.correct(json_Organize_ShowPic.message);
                    var i = Math.random();
                    $("#img_Organize_ShowPic").attr("src", "/Permission/Organize/ShowPic?id=" + '@ViewBag.ID' + "&i=" + i);
                }
            },
            'onSelect': function (e, queueId, fileObj) {
                if (fileObj.size > 1024 * 1024 * 30) {
                    alert(fileObj.name + "文件过大！已被过滤");
                    $(this).uploadifyCancel(queueId);
                }
            },
            'onError': function (event, queueID, fileObj, errorObj) {
                alertMsg.warn(errorObj.type + "Error:" + errorObj.info);
            }
        });
    });
</script>
<div class="pageContentD">
    @*顶部按钮*@
    <div class="panelBar">
        <ul class="toolBar">
            <li><a href="javascript:$('#FileLoad_Organize_ShowPic').uploadifyUpload()" class="add">
                <span>上传</span></a></li>
        </ul>
    </div>
    <div class="pageFormContent" layouth="85">
        <table width="100%" class="tab01">
            <tr>
                <td class="td1" height="30">
                    <span style="color: red">建议签字图片尺寸为110(宽)*50(高)&nbsp;&nbsp;</span>
                    <input type="file" name="FileLoad_Organize_ShowPic" id="FileLoad_Organize_ShowPic" />
                </td>
            </tr>
            <tr>
                <td class="td1" height="120">
                    <div id="FileQueue_Organize_ShowPic" style="width: 100%; height: 118px; overflow: auto;
                        border: 1px solid #A6C9E2">
                    </div>
                </td>
            </tr>
        </table>
        <img id="img_Organize_ShowPic" @Html.Raw(String.Format("src='/Permission/Organize/ShowPic?id={0}'", ViewBag.ID))  />
    </div>
    <div class='formBar'>
        <ul>
            <li>
                <button type="button" class="close btn btn-default btn-sm">
                    关闭</button>
    </div>
</div>
</li> </ul> </div> </div> 